
:root {
    --primary-color: #3498db;
    --secondary-color: #2980b9;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #34495e;
    --sidebar-width: 250px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: #f5f7fa;
}

/* 侧边栏样式 */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-color);
    color: white;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
}

.sidebar-header h3 {
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: #b8c7ce;
}

.sidebar-menu {
    padding: 20px 0;
}

.sidebar-menu li {
    list-style: none;
    position: relative;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: #b8c7ce;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    color: white;
    background-color: rgba(0, 0, 0, 0.2);
}

.sidebar-menu a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: all 0.3s;
}

/* 顶部导航栏 */
.top-navbar {
    background-color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.search-box {
    display: flex;
    align-items: center;
}

.search-box input {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 300px;
    outline: none;
}

.search-box button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    margin-left: 5px;
    cursor: pointer;
}

.user-menu {
    display: flex;
    align-items: center;
}

.user-menu .notification {
    position: relative;
    margin-right: 20px;
    cursor: pointer;
}

.user-menu .notification .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu .user-profile {
    display: flex;
    align-items: center;
}

.user-menu .user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

/* 内容区域 */
.content-wrapper {
    padding: 20px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.page-header h2 {
    color: var(--dark-color);
}

.breadcrumb {
    list-style: none;
    display: flex;
}

.breadcrumb li {
    margin-right: 10px;
    font-size: 14px;
}

.breadcrumb li:after {
    content: '/';
    margin-left: 10px;
    color: #999;
}

.breadcrumb li:last-child:after {
    content: '';
}

.breadcrumb li a {
    color: var(--primary-color);
    text-decoration: none;
}

/* 卡片样式 */
.card {
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    color: var(--dark-color);
}

.card-body {
    padding: 20px;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 5px;
    color: white;
}

.stat-card i {
    font-size: 40px;
    margin-right: 20px;
    opacity: 0.8;
}

.stat-card .info h3 {
    font-size: 24px;
    margin-bottom: 5px;
}

.stat-card .info p {
    font-size: 14px;
    opacity: 0.9;
}

.stat-card.primary {
    background-color: var(--primary-color);
}

.stat-card.success {
    background-color: var(--success-color);
}

.stat-card.warning {
    background-color: var(--warning-color);
}

.stat-card.danger {
    background-color: var(--danger-color);
}

/* 图表区域 */
.chart-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 992px) {
    .chart-row {
        grid-template-columns: 1fr;
    }
}

/* 最近活动 */
.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item .activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--primary-color);
}

.activity-item .activity-content {
    flex: 1;
}

.activity-item .activity-content h4 {
    font-size: 15px;
    margin-bottom: 5px;
}

.activity-item .activity-content p {
    font-size: 13px;
    color: #777;
}

.activity-item .activity-time {
    font-size: 12px;
    color: #999;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar.active {
        width: var(--sidebar-width);
    }

    .search-box input {
        width: 200px;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }
}
